package com.hushao.lims.weblims.repository;

import com.hushao.lims.weblims.domain.EquipmentScrap;
import com.hushao.lims.weblims.domain.TeacherInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @author 930588706
 * @date 18/1/28
 * 报废
 */
public interface EquipmentScrappedRepository extends JpaRepository<EquipmentScrap,Long> {
    /**
     * 根据器材名称模糊查询器材报废申请（分页）
     * @param equipmentName
     * @param teacher
     * @param pageable
     * @return
     */
    Page<EquipmentScrap> findByEquipmentInfo_EquipmentNameLikeAndTeacherInfo(String equipmentName, TeacherInfo teacher, Pageable pageable);

    Page<EquipmentScrap> findByEquipmentInfo_EquipmentNameLikeAndEquipmentScrapStateLike(String equipmentName, String state, Pageable pageable);
}
